package com.eas.web.common.chart;

import java.text.MessageFormat;

import org.apache.commons.lang.StringUtils;

public class KeyNode {

    public static final String TEXT_FORMAT_PATTERN = "'{'\"text\":\"{0}\"'}'";

    private String text;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String toString() {
        return MessageFormat.format(TEXT_FORMAT_PATTERN, StringUtils.trimToEmpty(text));
    }

    public String render() {
        return toString();
    }

}
